package com.atguigu.thread;

import com.atguigu.pojo.Printers;

public class ThreadOrderAccess {
    public static void main(String[] args) {
        Printers printers = new Printers();

        new Thread(() -> {for (int i = 0; i < 10; i++) printers.printA();},"A").start();
        new Thread(() -> {for (int i = 0; i < 10; i++) printers.printB();},"B").start();
        new Thread(() -> {for (int i = 0; i < 10; i++) printers.printC();},"C").start();
    }
}
